<template>
  <ul class="goods-sales">
    <li>
      <p>销量人气</p>
      <p>{{ goods.salesCount > 999 ? '999+' : "200+" }}</p>
      <p><i class="iconfont icon-task-filling"></i>销量人气</p>
    </li>
    <li>
      <p>商品评价</p>
      <p>{{ goods.commentCount > 999 ? '999+' : "400+" }}</p>
      <p><i class="iconfont icon-comment-filling"></i>查看评价</p>
    </li>
    <li>
      <p>收藏人气</p>
      <p>{{ goods.collectCount > 999 ? '999+' : "600+" }}</p>
      <p><i class="iconfont icon-favorite-filling"></i>收藏商品</p>
    </li>
    <li v-if="goods.brand">
      <p>品牌信息</p>
      <p>{{  goods.brand.name }}</p>
      <p><i class="iconfont icon-dynamic-filling"></i>品牌主页</p>
    </li>
  </ul>
</template>

<script>
export default {
  name: "PartSales",
  props:["goods"]
}
</script>

<style scoped>
  .goods-sales {
    display: flex;
    width: 400px;
    align-items: center;
    text-align: center;
    height: 140px;
  }
  li {
    flex: 1;
    position: relative;
  }
  li:after{
    position: absolute;
    top: 0;
    left: 0;
    height: 60px;
    border-left: 1px solid #e4e4e4;
    content: "";
  }
  li:first-child:after{
    border: 1px solid #fff;
  }
  .iconfont{
    color: #27ba9b;
  }
  p:first-child {
    color: #999;
  }

  p:nth-child(2) {
    color: #cf4444;
    margin-top: 10px;
  }

  p:last-child {
    color: #666;
    margin-top: 10px;
  }
  p:nth-child(3):hover{
    color: #27ba9b;
    cursor: pointer;
  }
</style>